<!DOCTYPE HTML>
<html>
<head>
<#include "/script.ftl">
<link rel="stylesheet" type="text/css" href="../static/eth/css/policyEdit.css" />
<script type="text/javascript" src="../static/eth/js/ElassBase.js"></script>
<script type="text/javascript" src="../static/eth/js/jElass.js"></script>
<script type="text/javascript" src="../static/eth/js/jElassExec.js"></script>
<script type="text/javascript" src="../static/eth/js/QueryGrid.js"></script>
<script type="text/javascript" src="../static/eth/js/policyEdit.js"></script>
<script type="text/javascript" src="../static/eth/js/extension.js"></script>
<script type="text/javascript" src="../static/eth/js/PolicyPersistence.js"></script>
<script type="text/javascript" src="../static/eth/js/resume.js"></script>
</head>
<body>
	<div class="page-container">
		<form class="form form-horizontal" id="form" action="save" method="post" autocomplete="off">
			<#include "/allairports.ftl">
			<input type="hidden" id="policyId" name="policyId" value="${policy.policyId!}" />
			<input type="hidden" id="sourcePolicyId" name="sourcePolicyId" value="${policy.sourcePolicyId!}" />
			<div class="edit_line">
			    <div class="edit_item">
			        <div class="edit_head">
			            <label><span class="c-red">*</span>行程类型</label>
			        </div>
		            <div class="edit_content">
		                <input type="hidden" id="flightType" value="${policy.flightType!''}" class="resume-check"/>
		                <label><input type="checkbox" name="flightType" id="flightType-OW" value="OW" required>单程</label>
	                    <label><input type="checkbox" name="flightType" id="flightType-RT" value="RT"><span>往返</span></label>
	                    <label id="flightType-error" class="error" for="flightType"></label>
		            </div>
		        </div>
		        <div class="edit_item">
		            <div class="edit_head">
		                <label><span class="c-red">*</span>票本类型</label>
		            </div>
		            <div class="edit_content">
		                <input type="hidden" id="ticketType" value="${policy.ticketType!''}" class="resume-check"/>
		                <label><input type="checkbox" name="ticketType" id="ticketType-BSP" value="BSPET" required><span>BSPET</span></label>
		                <label><input type="checkbox" name="ticketType" id="ticketType-B2B" value="BOP"><span>BOP</span></label>
		                <label id="ticketType-error" class="error" for="ticketType"></label>
		            </div>
	       		</div>
			</div>
			<div class="edit_line">
				<div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>航空公司</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="airline" value="${policy.airline!''}" class="input-text" placeholder="航司二字码" required minlength="2" maxlength="2"/>
		            </div>
		    	</div>
		    	<div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>office号</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="officeNo" value="${policy.officeNo!''}" class="input-text" required minlength="6" maxlength="6"/>
		            </div>
		        </div>
			</div>
			<div class="edit_line">
				<div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>协议号</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="protocolNo" value="${policy.protocolNo!''}" class="input-text" placeholder="" required />
		            </div>
		    	</div>
		    	<div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>协议客户</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" onClick="ClientId(clientName,clientId)" name="clientName" value="${policy.clientName!''}" class="input-text" placeholder="" required />
		                <input type="hidden" name="clientId" value="${policy.clientId!''}" class="input-text" placeholder="" required />
		            </div>
		    	</div>
			</div>
			<div class="edit_line">
				<div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>客户商业代码</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="clientBusinessCode" value="${policy.clientBusinessCode!''}" class="input-text"  required />
		            </div>
		    	</div>
		    	<div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>客户开票代码</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="clientTicketingCode" value="${policy.clientTicketingCode!''}" class="input-text" required />
		            </div>
		        </div>
			</div>
			<div class="edit_line">
			    <div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>代理费</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="commision" value="${policy.commision!''}" class="input-text" required number="true"/>
		                <input type="hidden" id="txt_RetreatTicketDiscount"/>
		                <span>%</span>
		                <label id="commision-error" class="error" for="commision"></label>
		            </div>
		        </div>
		        <div class="edit_item">
		            <div class="edit_head">
		                <label><span class="c-red">*</span>奖励</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="reward" value="${policy.reward!''}" class="input-text" required number="true"/>
		                <span>%</span>
		                <label id="reward-error" class="error" for="reward"></label>
		            </div>
		        </div>
			</div>
			<div class="edit_line">
			    <div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>最低任务量</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="minimumTask" value="${policy.minimumTask!''}" class="input-text" required />
		                <span>万/年</span>
		                <label id="minimumTask-error" class="error" for="minimumTask"></label>
		            </div>
		        </div>
		        <div class="edit_item">
		            <div class="edit_head">
		                <label>出票方式</label>
		            </div>
		            <div class="edit_content">
		                <input type="hidden" id="autoTicketingFlag" value="${policy.autoTicketingFlag!''}" class="resume-check"/>
		                <label><input type="checkbox" name="autoTicketingFlag" id="ticketType-Y" value="Y">自动出票</label>
		            </div>
		        </div>
			</div>
			<div class="edit_line">
			    <div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>协议有效期</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="protocolDateStartStr" id="protocolDateStartStr" value="${policy.protocolDateStartStr!''}" onfocus="WdatePicker({minDate:'%y-%M-%d'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
		                <input type="text" name="protocolDateEndStr" id="protocolDateEndStr" value="${policy.protocolDateEndStr!''}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'protocolDateStartStr\')||\'%y-%M-%d\'}'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
		            </div>
		        </div>
		        <div class="edit_item">
		            <div class="edit_head">
		                <label>共享航班</label>
		            </div>
		            <div class="edit_content">
		                <input type="hidden" id="autoFlightShareFlag" value="${policy.autoFlightShareFlag!''}" class="resume-check"/>
		                <label><input type="checkbox" name="autoFlightShareFlag" id="flightShare-Y" value="Y">适用共享航班</label>          
		            </div>
		    	</div>
			</div>
			<div class="edit_line">
			    <div class="edit_item">
			        <div class="edit_head">
		                <label><span class="c-red">*</span>预定日期</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="ticketingDateStartStr" id="ticketingDateStartStr" value="${policy.ticketingDateStartStr!''}" onfocus="WdatePicker({minDate:'%y-%M-%d'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
		                <input type="text" name="ticketingDateEndStr" id="ticketingDateEndStr" value="${policy.ticketingDateEndStr!''}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'ticketingDateStartStr\')||\'%y-%M-%d\'}'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
		            </div>
		        </div>
		        <div class="edit_item">
		            <div class="edit_head">
		                <label><span class="c-red">*</span>乘机日期</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="flightDateStartStr" id="flightDateStartStr" value="${policy.flightDateStartStr!''}" onfocus="WdatePicker({minDate:'%y-%M-%d'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
		                <input type="text" name="flightDateEndStr" id="flightDateEndStr" value="${policy.flightDateEndStr!''}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'flightDateStartStr\')||\'%y-%M-%d\'}'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
		            </div>
		        </div>
			</div>
			<div style="margin-bottom: 5px;">
				<input type="hidden" name="departure" id="departure" value="${policy.departure!''}">
			    <input type="hidden" name="departureExclude" id="departureExclude" value="${policy.departureExclude!''}">
			    <input type="hidden" name="departureCabins" id="departureCabins" value="${policy.departureCabins!''}">
			    <input type="hidden" name="arrival" id="arrival" value="${policy.arrival!''}">
			    <input type="hidden" name="arrivalCabins" id="arrivalCabins" value="${policy.arrivalCabins!''}">
			    <input type="hidden" name="arrivalExclude" id="arrivalExclude" value="${policy.arrivalExclude!''}">
			    <input type="hidden" name="transfer" id="transfer" value="${policy.transfer!''}">
			    <input type="hidden" name="journeyType" id="rd_ObTypeNum" value="${policy.journeyType!''}" class="resume-check">
				<div id="dv_ObTypeNum" class="_label_ObTypeNum" style="background-color: #f6f6f6; margin-top: 10px; border-top: 4px solid #eeeced;">
	                <table border="0" cellspacing="0" cellpadding="0" width="100%">
	                    <tr>
	                        <td class="_left">航班类型：
	                        </td>
	                        <td class="_right1" id="td_ObTypeNum" rd="P"></td>
	                    </tr>
	                </table>
            	</div>
	            <div id="dv_InitAirport" style="text-align: center; padding: 10px;">  
	            </div>
	            <div id="dv_CitiesC" style="display: none;">
	                <div id="dv_DepCity"></div>
	                <div id="dv_TransferCity" style="display: none;"></div>
	                <div id="dv_ArrCity" style=""></div>
	        	</div>
       		</div>
       		<div class="edit_line">
			    <div class="edit_item2">
			        <div class="edit_head2">
		                <label><span class="c-red">*</span>协议方名称</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="protocolName" id="protocolName" value="${policy.protocolName!''}" class="input-text" style="width:677px;" required>
		            </div>
		        </div>
			</div>
			<div class="edit_line">
			    <div class="edit_item2">
			        <div class="edit_head2">
		                <label><span class="c-red">*</span>协议方地址</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="protocolAddress" id="protocolAddress" value="${policy.protocolAddress!''}" class="input-text" style="width:677px;" required>
		            </div>
		        </div>
			</div>
			<div class="edit_line">
			    <div class="edit_item2">
			        <div class="edit_head2">
		                <label><span class="c-red">*</span>旅行管理公司名称</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="travelManagerName" id="travelManagerName" value="${policy.travelManagerName!''}" class="input-text" style="width:677px;" required>
		            </div>
		        </div>
			</div>
			<div class="edit_line">
			    <div class="edit_item2">
			        <div class="edit_head2">
		                <label><span class="c-red">*</span>旅行管理公司地址</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="travelManagerAddress" id="travelManagerAddress" value="${policy.travelManagerAddress!''}" class="input-text" style="width:677px;" required>
		            </div>
		        </div>
			</div>
       		<div class="edit_line">
		         <div class="edit_item2">
		            <div class="edit_head2">
		                <label><span class="c-red">*</span>乘机不适用日期</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="flightDateExcludeStartStr" id="flightDateExcludeStartStr" value="${policy.flightDateExcludeStartStr!''}" onfocus="WdatePicker({minDate:'%y-%M-%d'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" >
		                <input type="text" name="flightDateExcludeEndStr" id="flightDateExcludeEndStr" value="${policy.flightDateExcludeEndStr!''}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'flightDateExcludeStartStr\')||\'%y-%M-%d\'}'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" >
		            	<input type="button" id="addOne" value="添加"> 
		            </div>
		            <div id="select-result">
		            </div>
		        </div>
			</div>
       		<div class="edit_line">
			    <div class="edit_item">
			        <div class="edit_head2">
		                <label>适用航班</label>
		            </div>
		            <div class="edit_content" style="margin-left:20px;">
		                <input type="text" name="flight" value="${policy.flight!''}" class="input-text input-text-l" placeholder="格式：CA123/TG001-TG999/ 可不填" flightNo="true" />
		            </div>
		        </div>
		        <div class="edit_item">
		            <div class="edit_head2">
		                <label>不适用航班</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="flightExclude" value="${policy.flightExclude!''}" class="input-text input-text-l" placeholder="格式：CA123/TG001-TG999/ 可不填" flightNo="true"/>
		            </div>
		        </div>
			</div>
			<div class="edit_line">
			    <div class="edit_item">
			        <div class="edit_head2">
		                <label>适用国籍</label>
		            </div>
		            <div class="edit_content" style="margin-left:20px;">
		                <input type="text" name="nationality" value="${policy.nationality!''}" class="input-text input-text-l" placeholder="格式：CN/HK/ 可不填" flightNo="true" />
		            </div>
		        </div>
		        <div class="edit_item">
		            <div class="edit_head2">
		                <label>不适用国籍</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="nationalityExclude" value="${policy.nationalityExclude!''}" class="input-text input-text-l" placeholder="格式：CN/HK/ 可不填"/>
		            </div>
		        </div>
			</div>
			<div class="edit_line">	    
		        <div class="edit_item">
		            <div class="edit_head2">
		                <label>QTE指令</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="qte" value="${policy.qte!''}" class="input-text input-text-l" placeholder=""/>
		            </div>
		        </div>
		        <div class="edit_item">
			        <div class="edit_head2">
		                <label>FP项</label>
		            </div>
		            <div class="edit_content" style="margin-left:20px;">
		                <input type="text" name="fp" value="${policy.fp!''}" class="input-text input-text-l" placeholder=""  />
		            </div>
		        </div>
			</div>
			<div class="edit_line">
		        <div class="edit_item">
		            <div class="edit_head2">
		                <label>其他项</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="otherItems" value="${policy.otherItems!''}" class="input-text input-text-l" placeholder=""/>
		            </div>
		        </div>
			</div>
       		<div class="edit_line">
			    <div class="edit_item2">
			        <div class="edit_head2">
		                <label>政策别名</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="name" id="name" value="${policy.name!''}" class="input-text" style="width:677px;">
		            </div>
			    </div>
			</div>
			<div class="edit_line">
			    <div class="edit_item2">
			        <div class="edit_head2">
		                <label>政策备注</label>
		            </div>
		            <div class="edit_content">
		                <input type="text" name="memo" id="memo" value="${policy.memo!''}" class="input-text" style="width:677px;"> 
		            </div>
			    </div>
			</div>
			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
					<button class="btn btn-secondary radius" type="submit" id="submit1"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
					<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
				</div>
			</div>
		</form>
	</div>
</body>
</html>